package com.zyh.scs.admin.api.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.javers.core.metamodel.annotation.DiffInclude;
import org.javers.core.metamodel.annotation.PropertyName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author hwh
 * @ClassName: 预警提示实体类$
 * @Description: $
 * @Date $
 * @Version 1.0
 */
@Data
@TableName("scsx_early_warn")
@Schema(description = "预警提示实体类")
public class UserEarlyWarn implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "warn_id", type = IdType.AUTO)
    @Schema(description = "主键ID")
    private Long warnId;

    /**
     * 用户ID
     */
    @TableField("user_id")
    @Schema(description = "用户ID")
    private Long userId;

    /**
     * 用户名
     */
    @Schema(description = "用户名")
    private String username;

    /**
     * 工号
     */
    @TableField("user_job_number")
    @Schema(description = "工号")
    private String userJobNumber;

    /**
     * 手机号
     */
    @DiffInclude
    @PropertyName("手机号")
    @Schema(description = "手机号")
    @Length(min = 11, max = 11, message = "手机号必须为11位")
    private String phone;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建人")
    private String createBy;

    /**
     * 创建人
     */
    @TableField("operate_id")
    @Schema(description = "创建人")
    private String operateId;

    /**
     * 修改人
     */
    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "修改人")
    private String updateBy;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "修改时间")
    private LocalDateTime updateTime;

    /**
     * 0-正常，1-删除
     */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "删除标记,1:已删除,0:正常")
    private String delFlag;

    /**
     * 处理结果
     */
    @TableField("result")
    @Schema(description = "处理结果 1待处理 2账户合并 3忽略 4前一天自动忽略")
    private String result;

    /**
     * 处理时间
     */
    @TableField("result_time")
    @Schema(description = "处理时间")
    private LocalDateTime resultTime;

    /**
     * 账户类型  新账户为1  旧账户为2
     */
    @TableField("early_type")
    @Schema(description = "账户类型  新账户为1  旧账户为2")
    private String earlyType;

    /**
     * 现金账户金额元
     */
    @Schema(description = "现金账户金额元")
    @TableField("cash_account")
    private BigDecimal cashAccount;

    /**
     * 餐补账户账户金额元
     */
    @Schema(description = "餐补账户账户金额元")
    @TableField("card_account")
    private BigDecimal cardAccount;

    /**
     * 新账户userId
     */
    @Schema(description = "新账户userId")
    @TableField("new_user_id")
    private Long newUserId;

    /**
     * 预警id  新账号
     */
    @Schema(description = "预警id  新账号")
    @TableField("new_id")
    private Long newId;

    /**
     * 重复字段
     */
    @Schema(description = "重复字段")
    @TableField("repeat_field")
    private String repeatField;

    @Schema(description = "guid")
    @TableField("guid")
    private String guid;
}
